// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file calculatorTypeObjectSupport.cxx
 * Source file containing the implementation to register the TypeObject representation of the described types in the IDL file
 *
 * This file was generated by the tool fastddsgen (version: 4.2.0).
 */

#include "calculatorTypeObjectSupport.hpp"

#include <mutex>
#include <string>

#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>
#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
#include <fastdds/dds/log/Log.hpp>
#include <fastdds/dds/xtypes/common.hpp>
#include <fastdds/dds/xtypes/type_representation/ITypeObjectRegistry.hpp>
#include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>
#include <fastdds/dds/xtypes/type_representation/TypeObjectUtils.hpp>
#include <fastdds/dds/rpc/RPCTypeObjectSupport.hpp>

#include "calculator.hpp"


using namespace eprosima::fastdds::dds::xtypes;

namespace calculator_example {
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_OverflowException_type_identifier(
        TypeIdentifierPair& type_ids_OverflowException)
{

    ReturnCode_t return_code_OverflowException {eprosima::fastdds::dds::RETCODE_OK};
    return_code_OverflowException =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::OverflowException", type_ids_OverflowException);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_OverflowException)
    {
        StructTypeFlag struct_flags_OverflowException = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::FINAL,
                false, false);
        return_code_OverflowException =
            eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
            "eprosima::fastdds::dds::rpc::RpcOperationError", type_ids_OverflowException);

        if (return_code_OverflowException != eprosima::fastdds::dds::RETCODE_OK)
        {
            ::eprosima::fastdds::dds::rpc::register_RpcOperationError_type_identifier(type_ids_OverflowException);
        }
        QualifiedTypeName type_name_OverflowException = "calculator_example::OverflowException";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_OverflowException;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_OverflowException;
        CompleteTypeDetail detail_OverflowException = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_OverflowException, ann_custom_OverflowException, type_name_OverflowException.to_string());
        CompleteStructHeader header_OverflowException;
        if (EK_COMPLETE == type_ids_OverflowException.type_identifier1()._d())
        {
            header_OverflowException = TypeObjectUtils::build_complete_struct_header(type_ids_OverflowException.type_identifier1(), detail_OverflowException);
        }
        else if (EK_COMPLETE == type_ids_OverflowException.type_identifier2()._d())
        {
            header_OverflowException = TypeObjectUtils::build_complete_struct_header(type_ids_OverflowException.type_identifier2(), detail_OverflowException);
        }
        else
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::OverflowException Structure: base_type TypeIdentifier registered in TypeObjectRegistry is inconsistent.");
            return;
        }
        CompleteStructMemberSeq member_seq_OverflowException;
        CompleteStructType struct_type_OverflowException = TypeObjectUtils::build_complete_struct_type(struct_flags_OverflowException, header_OverflowException, member_seq_OverflowException);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_OverflowException, type_name_OverflowException.to_string(), type_ids_OverflowException))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::OverflowException already registered in TypeObjectRegistry for a different type.");
        }
    }
}

namespace detail {

//{ representation_limits
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_representation_limits_In_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_representation_limits_In)
{

    ReturnCode_t return_code_Calculator_representation_limits_In {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_representation_limits_In =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_representation_limits_In", type_ids_Calculator_representation_limits_In);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_representation_limits_In)
    {
        StructTypeFlag struct_flags_Calculator_representation_limits_In = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::FINAL,
                false, false);
        QualifiedTypeName type_name_Calculator_representation_limits_In = "calculator_example::detail::Calculator_representation_limits_In";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_representation_limits_In;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_representation_limits_In;
        CompleteTypeDetail detail_Calculator_representation_limits_In = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_representation_limits_In, ann_custom_Calculator_representation_limits_In, type_name_Calculator_representation_limits_In.to_string());
        CompleteStructHeader header_Calculator_representation_limits_In;
        header_Calculator_representation_limits_In = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_representation_limits_In);
        CompleteStructMemberSeq member_seq_Calculator_representation_limits_In;
        CompleteStructType struct_type_Calculator_representation_limits_In = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_representation_limits_In, header_Calculator_representation_limits_In, member_seq_Calculator_representation_limits_In);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_representation_limits_In, type_name_Calculator_representation_limits_In.to_string(), type_ids_Calculator_representation_limits_In))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_representation_limits_In already registered in TypeObjectRegistry for a different type.");
        }
    }
}


// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_representation_limits_Out_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_representation_limits_Out)
{

    ReturnCode_t return_code_Calculator_representation_limits_Out {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_representation_limits_Out =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_representation_limits_Out", type_ids_Calculator_representation_limits_Out);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_representation_limits_Out)
    {
        StructTypeFlag struct_flags_Calculator_representation_limits_Out = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::FINAL,
                false, false);
        QualifiedTypeName type_name_Calculator_representation_limits_Out = "calculator_example::detail::Calculator_representation_limits_Out";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_representation_limits_Out;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_representation_limits_Out;
        CompleteTypeDetail detail_Calculator_representation_limits_Out = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_representation_limits_Out, ann_custom_Calculator_representation_limits_Out, type_name_Calculator_representation_limits_Out.to_string());
        CompleteStructHeader header_Calculator_representation_limits_Out;
        header_Calculator_representation_limits_Out = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_representation_limits_Out);
        CompleteStructMemberSeq member_seq_Calculator_representation_limits_Out;
        {
            TypeIdentifierPair type_ids_min_value;
            ReturnCode_t return_code_min_value {eprosima::fastdds::dds::RETCODE_OK};
            return_code_min_value =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "_int32_t", type_ids_min_value);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_min_value)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "min_value Structure member TypeIdentifier unknown to TypeObjectRegistry.");
                return;
            }
            StructMemberFlag member_flags_min_value = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    false, false, false, false);
            MemberId member_id_min_value = 0x00000000;
            bool common_min_value_ec {false};
            CommonStructMember common_min_value {TypeObjectUtils::build_common_struct_member(member_id_min_value, member_flags_min_value, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_min_value, common_min_value_ec))};
            if (!common_min_value_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure min_value member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_min_value = "min_value";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_min_value;
            ann_custom_Calculator_representation_limits_Out.reset();
            CompleteMemberDetail detail_min_value = TypeObjectUtils::build_complete_member_detail(name_min_value, member_ann_builtin_min_value, ann_custom_Calculator_representation_limits_Out);
            CompleteStructMember member_min_value = TypeObjectUtils::build_complete_struct_member(common_min_value, detail_min_value);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_representation_limits_Out, member_min_value);
        }
        {
            TypeIdentifierPair type_ids_max_value;
            ReturnCode_t return_code_max_value {eprosima::fastdds::dds::RETCODE_OK};
            return_code_max_value =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "_int32_t", type_ids_max_value);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_max_value)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "max_value Structure member TypeIdentifier unknown to TypeObjectRegistry.");
                return;
            }
            StructMemberFlag member_flags_max_value = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    false, false, false, false);
            MemberId member_id_max_value = 0x00000001;
            bool common_max_value_ec {false};
            CommonStructMember common_max_value {TypeObjectUtils::build_common_struct_member(member_id_max_value, member_flags_max_value, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_max_value, common_max_value_ec))};
            if (!common_max_value_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure max_value member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_max_value = "max_value";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_max_value;
            ann_custom_Calculator_representation_limits_Out.reset();
            CompleteMemberDetail detail_max_value = TypeObjectUtils::build_complete_member_detail(name_max_value, member_ann_builtin_max_value, ann_custom_Calculator_representation_limits_Out);
            CompleteStructMember member_max_value = TypeObjectUtils::build_complete_struct_member(common_max_value, detail_max_value);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_representation_limits_Out, member_max_value);
        }
        CompleteStructType struct_type_Calculator_representation_limits_Out = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_representation_limits_Out, header_Calculator_representation_limits_Out, member_seq_Calculator_representation_limits_Out);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_representation_limits_Out, type_name_Calculator_representation_limits_Out.to_string(), type_ids_Calculator_representation_limits_Out))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_representation_limits_Out already registered in TypeObjectRegistry for a different type.");
        }
    }
}

// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_representation_limits_Result_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_representation_limits_Result)
{

    ReturnCode_t return_code_Calculator_representation_limits_Result {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_representation_limits_Result =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_representation_limits_Result", type_ids_Calculator_representation_limits_Result);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_representation_limits_Result)
    {
        StructTypeFlag struct_flags_Calculator_representation_limits_Result = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::MUTABLE,
                false, false);
        QualifiedTypeName type_name_Calculator_representation_limits_Result = "calculator_example::detail::Calculator_representation_limits_Result";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_representation_limits_Result;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_representation_limits_Result;
        CompleteTypeDetail detail_Calculator_representation_limits_Result = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_representation_limits_Result, ann_custom_Calculator_representation_limits_Result, type_name_Calculator_representation_limits_Result.to_string());
        CompleteStructHeader header_Calculator_representation_limits_Result;
        header_Calculator_representation_limits_Result = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_representation_limits_Result);
        CompleteStructMemberSeq member_seq_Calculator_representation_limits_Result;
        {
            TypeIdentifierPair type_ids_result;
            ReturnCode_t return_code_result {eprosima::fastdds::dds::RETCODE_OK};
            return_code_result =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_representation_limits_Out", type_ids_result);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_result)
            {
                ::calculator_example::detail::register_Calculator_representation_limits_Out_type_identifier(type_ids_result);
            }
            StructMemberFlag member_flags_result = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_result = 0x0784a8b4;
            bool common_result_ec {false};
            CommonStructMember common_result {TypeObjectUtils::build_common_struct_member(member_id_result, member_flags_result, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_result, common_result_ec))};
            if (!common_result_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure result member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_result = "result";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_result;
            ann_custom_Calculator_representation_limits_Result.reset();
            AppliedAnnotationSeq tmp_ann_custom_result;
            eprosima::fastcdr::optional<std::string> unit_result;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_result;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_result;
            eprosima::fastcdr::optional<std::string> hash_id_result;
            hash_id_result = "";

            if (unit_result.has_value() || min_result.has_value() || max_result.has_value() || hash_id_result.has_value())
            {
                member_ann_builtin_result = TypeObjectUtils::build_applied_builtin_member_annotations(unit_result, min_result, max_result, hash_id_result);
            }
            if (!tmp_ann_custom_result.empty())
            {
                ann_custom_Calculator_representation_limits_Result = tmp_ann_custom_result;
            }
            CompleteMemberDetail detail_result = TypeObjectUtils::build_complete_member_detail(name_result, member_ann_builtin_result, ann_custom_Calculator_representation_limits_Result);
            CompleteStructMember member_result = TypeObjectUtils::build_complete_struct_member(common_result, detail_result);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_representation_limits_Result, member_result);
        }
        CompleteStructType struct_type_Calculator_representation_limits_Result = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_representation_limits_Result, header_Calculator_representation_limits_Result, member_seq_Calculator_representation_limits_Result);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_representation_limits_Result, type_name_Calculator_representation_limits_Result.to_string(), type_ids_Calculator_representation_limits_Result))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_representation_limits_Result already registered in TypeObjectRegistry for a different type.");
        }
    }
}

//}  // representation_limits
 
//{ addition
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_addition_In_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_addition_In)
{

    ReturnCode_t return_code_Calculator_addition_In {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_addition_In =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_addition_In", type_ids_Calculator_addition_In);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_addition_In)
    {
        StructTypeFlag struct_flags_Calculator_addition_In = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::FINAL,
                false, false);
        QualifiedTypeName type_name_Calculator_addition_In = "calculator_example::detail::Calculator_addition_In";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_addition_In;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_addition_In;
        CompleteTypeDetail detail_Calculator_addition_In = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_addition_In, ann_custom_Calculator_addition_In, type_name_Calculator_addition_In.to_string());
        CompleteStructHeader header_Calculator_addition_In;
        header_Calculator_addition_In = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_addition_In);
        CompleteStructMemberSeq member_seq_Calculator_addition_In;
        {
            TypeIdentifierPair type_ids_value1;
            ReturnCode_t return_code_value1 {eprosima::fastdds::dds::RETCODE_OK};
            return_code_value1 =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "_int32_t", type_ids_value1);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_value1)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "value1 Structure member TypeIdentifier unknown to TypeObjectRegistry.");
                return;
            }
            StructMemberFlag member_flags_value1 = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    false, false, false, false);
            MemberId member_id_value1 = 0x00000000;
            bool common_value1_ec {false};
            CommonStructMember common_value1 {TypeObjectUtils::build_common_struct_member(member_id_value1, member_flags_value1, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_value1, common_value1_ec))};
            if (!common_value1_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure value1 member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_value1 = "value1";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_value1;
            ann_custom_Calculator_addition_In.reset();
            CompleteMemberDetail detail_value1 = TypeObjectUtils::build_complete_member_detail(name_value1, member_ann_builtin_value1, ann_custom_Calculator_addition_In);
            CompleteStructMember member_value1 = TypeObjectUtils::build_complete_struct_member(common_value1, detail_value1);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_addition_In, member_value1);
        }
        {
            TypeIdentifierPair type_ids_value2;
            ReturnCode_t return_code_value2 {eprosima::fastdds::dds::RETCODE_OK};
            return_code_value2 =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "_int32_t", type_ids_value2);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_value2)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "value2 Structure member TypeIdentifier unknown to TypeObjectRegistry.");
                return;
            }
            StructMemberFlag member_flags_value2 = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    false, false, false, false);
            MemberId member_id_value2 = 0x00000001;
            bool common_value2_ec {false};
            CommonStructMember common_value2 {TypeObjectUtils::build_common_struct_member(member_id_value2, member_flags_value2, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_value2, common_value2_ec))};
            if (!common_value2_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure value2 member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_value2 = "value2";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_value2;
            ann_custom_Calculator_addition_In.reset();
            CompleteMemberDetail detail_value2 = TypeObjectUtils::build_complete_member_detail(name_value2, member_ann_builtin_value2, ann_custom_Calculator_addition_In);
            CompleteStructMember member_value2 = TypeObjectUtils::build_complete_struct_member(common_value2, detail_value2);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_addition_In, member_value2);
        }
        CompleteStructType struct_type_Calculator_addition_In = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_addition_In, header_Calculator_addition_In, member_seq_Calculator_addition_In);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_addition_In, type_name_Calculator_addition_In.to_string(), type_ids_Calculator_addition_In))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_addition_In already registered in TypeObjectRegistry for a different type.");
        }
    }
}

  

// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_addition_Out_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_addition_Out)
{

    ReturnCode_t return_code_Calculator_addition_Out {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_addition_Out =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_addition_Out", type_ids_Calculator_addition_Out);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_addition_Out)
    {
        StructTypeFlag struct_flags_Calculator_addition_Out = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::FINAL,
                false, false);
        QualifiedTypeName type_name_Calculator_addition_Out = "calculator_example::detail::Calculator_addition_Out";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_addition_Out;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_addition_Out;
        CompleteTypeDetail detail_Calculator_addition_Out = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_addition_Out, ann_custom_Calculator_addition_Out, type_name_Calculator_addition_Out.to_string());
        CompleteStructHeader header_Calculator_addition_Out;
        header_Calculator_addition_Out = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_addition_Out);
        CompleteStructMemberSeq member_seq_Calculator_addition_Out;
        {
            TypeIdentifierPair type_ids_return_;
            ReturnCode_t return_code_return_ {eprosima::fastdds::dds::RETCODE_OK};
            return_code_return_ =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "_int32_t", type_ids_return_);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_return_)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "return_ Structure member TypeIdentifier unknown to TypeObjectRegistry.");
                return;
            }
            StructMemberFlag member_flags_return_ = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    false, false, false, false);
            MemberId member_id_return_ = 0x00000000;
            bool common_return__ec {false};
            CommonStructMember common_return_ {TypeObjectUtils::build_common_struct_member(member_id_return_, member_flags_return_, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_return_, common_return__ec))};
            if (!common_return__ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure return_ member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_return_ = "return_";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_return_;
            ann_custom_Calculator_addition_Out.reset();
            CompleteMemberDetail detail_return_ = TypeObjectUtils::build_complete_member_detail(name_return_, member_ann_builtin_return_, ann_custom_Calculator_addition_Out);
            CompleteStructMember member_return_ = TypeObjectUtils::build_complete_struct_member(common_return_, detail_return_);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_addition_Out, member_return_);
        }
        CompleteStructType struct_type_Calculator_addition_Out = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_addition_Out, header_Calculator_addition_Out, member_seq_Calculator_addition_Out);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_addition_Out, type_name_Calculator_addition_Out.to_string(), type_ids_Calculator_addition_Out))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_addition_Out already registered in TypeObjectRegistry for a different type.");
        }
    }
}

// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_addition_Result_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_addition_Result)
{

    ReturnCode_t return_code_Calculator_addition_Result {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_addition_Result =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_addition_Result", type_ids_Calculator_addition_Result);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_addition_Result)
    {
        StructTypeFlag struct_flags_Calculator_addition_Result = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::MUTABLE,
                false, false);
        QualifiedTypeName type_name_Calculator_addition_Result = "calculator_example::detail::Calculator_addition_Result";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_addition_Result;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_addition_Result;
        CompleteTypeDetail detail_Calculator_addition_Result = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_addition_Result, ann_custom_Calculator_addition_Result, type_name_Calculator_addition_Result.to_string());
        CompleteStructHeader header_Calculator_addition_Result;
        header_Calculator_addition_Result = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_addition_Result);
        CompleteStructMemberSeq member_seq_Calculator_addition_Result;
        {
            TypeIdentifierPair type_ids_result;
            ReturnCode_t return_code_result {eprosima::fastdds::dds::RETCODE_OK};
            return_code_result =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_addition_Out", type_ids_result);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_result)
            {
                ::calculator_example::detail::register_Calculator_addition_Out_type_identifier(type_ids_result);
            }
            StructMemberFlag member_flags_result = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_result = 0x0784a8b4;
            bool common_result_ec {false};
            CommonStructMember common_result {TypeObjectUtils::build_common_struct_member(member_id_result, member_flags_result, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_result, common_result_ec))};
            if (!common_result_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure result member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_result = "result";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_result;
            ann_custom_Calculator_addition_Result.reset();
            AppliedAnnotationSeq tmp_ann_custom_result;
            eprosima::fastcdr::optional<std::string> unit_result;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_result;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_result;
            eprosima::fastcdr::optional<std::string> hash_id_result;
            hash_id_result = "";

            if (unit_result.has_value() || min_result.has_value() || max_result.has_value() || hash_id_result.has_value())
            {
                member_ann_builtin_result = TypeObjectUtils::build_applied_builtin_member_annotations(unit_result, min_result, max_result, hash_id_result);
            }
            if (!tmp_ann_custom_result.empty())
            {
                ann_custom_Calculator_addition_Result = tmp_ann_custom_result;
            }
            CompleteMemberDetail detail_result = TypeObjectUtils::build_complete_member_detail(name_result, member_ann_builtin_result, ann_custom_Calculator_addition_Result);
            CompleteStructMember member_result = TypeObjectUtils::build_complete_struct_member(common_result, detail_result);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_addition_Result, member_result);
        }
        {
            TypeIdentifierPair type_ids_calculator_example_OverflowException_ex;
            ReturnCode_t return_code_calculator_example_OverflowException_ex {eprosima::fastdds::dds::RETCODE_OK};
            return_code_calculator_example_OverflowException_ex =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::OverflowException", type_ids_calculator_example_OverflowException_ex);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_calculator_example_OverflowException_ex)
            {
                ::calculator_example::register_OverflowException_type_identifier(type_ids_calculator_example_OverflowException_ex);
            }
            StructMemberFlag member_flags_calculator_example_OverflowException_ex = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_calculator_example_OverflowException_ex = 0x0d39fcce;
            bool common_calculator_example_OverflowException_ex_ec {false};
            CommonStructMember common_calculator_example_OverflowException_ex {TypeObjectUtils::build_common_struct_member(member_id_calculator_example_OverflowException_ex, member_flags_calculator_example_OverflowException_ex, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_calculator_example_OverflowException_ex, common_calculator_example_OverflowException_ex_ec))};
            if (!common_calculator_example_OverflowException_ex_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure calculator_example_OverflowException_ex member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_calculator_example_OverflowException_ex = "calculator_example_OverflowException_ex";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_calculator_example_OverflowException_ex;
            ann_custom_Calculator_addition_Result.reset();
            AppliedAnnotationSeq tmp_ann_custom_calculator_example_OverflowException_ex;
            eprosima::fastcdr::optional<std::string> unit_calculator_example_OverflowException_ex;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_calculator_example_OverflowException_ex;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_calculator_example_OverflowException_ex;
            eprosima::fastcdr::optional<std::string> hash_id_calculator_example_OverflowException_ex;
            hash_id_calculator_example_OverflowException_ex = "";

            if (unit_calculator_example_OverflowException_ex.has_value() || min_calculator_example_OverflowException_ex.has_value() || max_calculator_example_OverflowException_ex.has_value() || hash_id_calculator_example_OverflowException_ex.has_value())
            {
                member_ann_builtin_calculator_example_OverflowException_ex = TypeObjectUtils::build_applied_builtin_member_annotations(unit_calculator_example_OverflowException_ex, min_calculator_example_OverflowException_ex, max_calculator_example_OverflowException_ex, hash_id_calculator_example_OverflowException_ex);
            }
            if (!tmp_ann_custom_calculator_example_OverflowException_ex.empty())
            {
                ann_custom_Calculator_addition_Result = tmp_ann_custom_calculator_example_OverflowException_ex;
            }
            CompleteMemberDetail detail_calculator_example_OverflowException_ex = TypeObjectUtils::build_complete_member_detail(name_calculator_example_OverflowException_ex, member_ann_builtin_calculator_example_OverflowException_ex, ann_custom_Calculator_addition_Result);
            CompleteStructMember member_calculator_example_OverflowException_ex = TypeObjectUtils::build_complete_struct_member(common_calculator_example_OverflowException_ex, detail_calculator_example_OverflowException_ex);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_addition_Result, member_calculator_example_OverflowException_ex);
        }
        CompleteStructType struct_type_Calculator_addition_Result = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_addition_Result, header_Calculator_addition_Result, member_seq_Calculator_addition_Result);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_addition_Result, type_name_Calculator_addition_Result.to_string(), type_ids_Calculator_addition_Result))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_addition_Result already registered in TypeObjectRegistry for a different type.");
        }
    }
}

//}  // addition
 
//{ subtraction
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_subtraction_In_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_subtraction_In)
{

    ReturnCode_t return_code_Calculator_subtraction_In {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_subtraction_In =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_subtraction_In", type_ids_Calculator_subtraction_In);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_subtraction_In)
    {
        StructTypeFlag struct_flags_Calculator_subtraction_In = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::FINAL,
                false, false);
        QualifiedTypeName type_name_Calculator_subtraction_In = "calculator_example::detail::Calculator_subtraction_In";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_subtraction_In;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_subtraction_In;
        CompleteTypeDetail detail_Calculator_subtraction_In = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_subtraction_In, ann_custom_Calculator_subtraction_In, type_name_Calculator_subtraction_In.to_string());
        CompleteStructHeader header_Calculator_subtraction_In;
        header_Calculator_subtraction_In = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_subtraction_In);
        CompleteStructMemberSeq member_seq_Calculator_subtraction_In;
        {
            TypeIdentifierPair type_ids_value1;
            ReturnCode_t return_code_value1 {eprosima::fastdds::dds::RETCODE_OK};
            return_code_value1 =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "_int32_t", type_ids_value1);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_value1)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "value1 Structure member TypeIdentifier unknown to TypeObjectRegistry.");
                return;
            }
            StructMemberFlag member_flags_value1 = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    false, false, false, false);
            MemberId member_id_value1 = 0x00000000;
            bool common_value1_ec {false};
            CommonStructMember common_value1 {TypeObjectUtils::build_common_struct_member(member_id_value1, member_flags_value1, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_value1, common_value1_ec))};
            if (!common_value1_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure value1 member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_value1 = "value1";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_value1;
            ann_custom_Calculator_subtraction_In.reset();
            CompleteMemberDetail detail_value1 = TypeObjectUtils::build_complete_member_detail(name_value1, member_ann_builtin_value1, ann_custom_Calculator_subtraction_In);
            CompleteStructMember member_value1 = TypeObjectUtils::build_complete_struct_member(common_value1, detail_value1);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_subtraction_In, member_value1);
        }
        {
            TypeIdentifierPair type_ids_value2;
            ReturnCode_t return_code_value2 {eprosima::fastdds::dds::RETCODE_OK};
            return_code_value2 =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "_int32_t", type_ids_value2);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_value2)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "value2 Structure member TypeIdentifier unknown to TypeObjectRegistry.");
                return;
            }
            StructMemberFlag member_flags_value2 = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    false, false, false, false);
            MemberId member_id_value2 = 0x00000001;
            bool common_value2_ec {false};
            CommonStructMember common_value2 {TypeObjectUtils::build_common_struct_member(member_id_value2, member_flags_value2, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_value2, common_value2_ec))};
            if (!common_value2_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure value2 member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_value2 = "value2";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_value2;
            ann_custom_Calculator_subtraction_In.reset();
            CompleteMemberDetail detail_value2 = TypeObjectUtils::build_complete_member_detail(name_value2, member_ann_builtin_value2, ann_custom_Calculator_subtraction_In);
            CompleteStructMember member_value2 = TypeObjectUtils::build_complete_struct_member(common_value2, detail_value2);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_subtraction_In, member_value2);
        }
        CompleteStructType struct_type_Calculator_subtraction_In = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_subtraction_In, header_Calculator_subtraction_In, member_seq_Calculator_subtraction_In);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_subtraction_In, type_name_Calculator_subtraction_In.to_string(), type_ids_Calculator_subtraction_In))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_subtraction_In already registered in TypeObjectRegistry for a different type.");
        }
    }
}

  

// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_subtraction_Out_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_subtraction_Out)
{

    ReturnCode_t return_code_Calculator_subtraction_Out {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_subtraction_Out =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_subtraction_Out", type_ids_Calculator_subtraction_Out);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_subtraction_Out)
    {
        StructTypeFlag struct_flags_Calculator_subtraction_Out = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::FINAL,
                false, false);
        QualifiedTypeName type_name_Calculator_subtraction_Out = "calculator_example::detail::Calculator_subtraction_Out";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_subtraction_Out;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_subtraction_Out;
        CompleteTypeDetail detail_Calculator_subtraction_Out = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_subtraction_Out, ann_custom_Calculator_subtraction_Out, type_name_Calculator_subtraction_Out.to_string());
        CompleteStructHeader header_Calculator_subtraction_Out;
        header_Calculator_subtraction_Out = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_subtraction_Out);
        CompleteStructMemberSeq member_seq_Calculator_subtraction_Out;
        {
            TypeIdentifierPair type_ids_return_;
            ReturnCode_t return_code_return_ {eprosima::fastdds::dds::RETCODE_OK};
            return_code_return_ =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "_int32_t", type_ids_return_);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_return_)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                        "return_ Structure member TypeIdentifier unknown to TypeObjectRegistry.");
                return;
            }
            StructMemberFlag member_flags_return_ = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    false, false, false, false);
            MemberId member_id_return_ = 0x00000000;
            bool common_return__ec {false};
            CommonStructMember common_return_ {TypeObjectUtils::build_common_struct_member(member_id_return_, member_flags_return_, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_return_, common_return__ec))};
            if (!common_return__ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure return_ member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_return_ = "return_";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_return_;
            ann_custom_Calculator_subtraction_Out.reset();
            CompleteMemberDetail detail_return_ = TypeObjectUtils::build_complete_member_detail(name_return_, member_ann_builtin_return_, ann_custom_Calculator_subtraction_Out);
            CompleteStructMember member_return_ = TypeObjectUtils::build_complete_struct_member(common_return_, detail_return_);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_subtraction_Out, member_return_);
        }
        CompleteStructType struct_type_Calculator_subtraction_Out = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_subtraction_Out, header_Calculator_subtraction_Out, member_seq_Calculator_subtraction_Out);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_subtraction_Out, type_name_Calculator_subtraction_Out.to_string(), type_ids_Calculator_subtraction_Out))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_subtraction_Out already registered in TypeObjectRegistry for a different type.");
        }
    }
}

// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_subtraction_Result_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_subtraction_Result)
{

    ReturnCode_t return_code_Calculator_subtraction_Result {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_subtraction_Result =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_subtraction_Result", type_ids_Calculator_subtraction_Result);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_subtraction_Result)
    {
        StructTypeFlag struct_flags_Calculator_subtraction_Result = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::MUTABLE,
                false, false);
        QualifiedTypeName type_name_Calculator_subtraction_Result = "calculator_example::detail::Calculator_subtraction_Result";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_subtraction_Result;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_subtraction_Result;
        CompleteTypeDetail detail_Calculator_subtraction_Result = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_subtraction_Result, ann_custom_Calculator_subtraction_Result, type_name_Calculator_subtraction_Result.to_string());
        CompleteStructHeader header_Calculator_subtraction_Result;
        header_Calculator_subtraction_Result = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_subtraction_Result);
        CompleteStructMemberSeq member_seq_Calculator_subtraction_Result;
        {
            TypeIdentifierPair type_ids_result;
            ReturnCode_t return_code_result {eprosima::fastdds::dds::RETCODE_OK};
            return_code_result =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_subtraction_Out", type_ids_result);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_result)
            {
                ::calculator_example::detail::register_Calculator_subtraction_Out_type_identifier(type_ids_result);
            }
            StructMemberFlag member_flags_result = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_result = 0x0784a8b4;
            bool common_result_ec {false};
            CommonStructMember common_result {TypeObjectUtils::build_common_struct_member(member_id_result, member_flags_result, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_result, common_result_ec))};
            if (!common_result_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure result member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_result = "result";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_result;
            ann_custom_Calculator_subtraction_Result.reset();
            AppliedAnnotationSeq tmp_ann_custom_result;
            eprosima::fastcdr::optional<std::string> unit_result;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_result;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_result;
            eprosima::fastcdr::optional<std::string> hash_id_result;
            hash_id_result = "";

            if (unit_result.has_value() || min_result.has_value() || max_result.has_value() || hash_id_result.has_value())
            {
                member_ann_builtin_result = TypeObjectUtils::build_applied_builtin_member_annotations(unit_result, min_result, max_result, hash_id_result);
            }
            if (!tmp_ann_custom_result.empty())
            {
                ann_custom_Calculator_subtraction_Result = tmp_ann_custom_result;
            }
            CompleteMemberDetail detail_result = TypeObjectUtils::build_complete_member_detail(name_result, member_ann_builtin_result, ann_custom_Calculator_subtraction_Result);
            CompleteStructMember member_result = TypeObjectUtils::build_complete_struct_member(common_result, detail_result);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_subtraction_Result, member_result);
        }
        {
            TypeIdentifierPair type_ids_calculator_example_OverflowException_ex;
            ReturnCode_t return_code_calculator_example_OverflowException_ex {eprosima::fastdds::dds::RETCODE_OK};
            return_code_calculator_example_OverflowException_ex =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::OverflowException", type_ids_calculator_example_OverflowException_ex);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_calculator_example_OverflowException_ex)
            {
                ::calculator_example::register_OverflowException_type_identifier(type_ids_calculator_example_OverflowException_ex);
            }
            StructMemberFlag member_flags_calculator_example_OverflowException_ex = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_calculator_example_OverflowException_ex = 0x0d39fcce;
            bool common_calculator_example_OverflowException_ex_ec {false};
            CommonStructMember common_calculator_example_OverflowException_ex {TypeObjectUtils::build_common_struct_member(member_id_calculator_example_OverflowException_ex, member_flags_calculator_example_OverflowException_ex, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_calculator_example_OverflowException_ex, common_calculator_example_OverflowException_ex_ec))};
            if (!common_calculator_example_OverflowException_ex_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure calculator_example_OverflowException_ex member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_calculator_example_OverflowException_ex = "calculator_example_OverflowException_ex";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_calculator_example_OverflowException_ex;
            ann_custom_Calculator_subtraction_Result.reset();
            AppliedAnnotationSeq tmp_ann_custom_calculator_example_OverflowException_ex;
            eprosima::fastcdr::optional<std::string> unit_calculator_example_OverflowException_ex;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_calculator_example_OverflowException_ex;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_calculator_example_OverflowException_ex;
            eprosima::fastcdr::optional<std::string> hash_id_calculator_example_OverflowException_ex;
            hash_id_calculator_example_OverflowException_ex = "";

            if (unit_calculator_example_OverflowException_ex.has_value() || min_calculator_example_OverflowException_ex.has_value() || max_calculator_example_OverflowException_ex.has_value() || hash_id_calculator_example_OverflowException_ex.has_value())
            {
                member_ann_builtin_calculator_example_OverflowException_ex = TypeObjectUtils::build_applied_builtin_member_annotations(unit_calculator_example_OverflowException_ex, min_calculator_example_OverflowException_ex, max_calculator_example_OverflowException_ex, hash_id_calculator_example_OverflowException_ex);
            }
            if (!tmp_ann_custom_calculator_example_OverflowException_ex.empty())
            {
                ann_custom_Calculator_subtraction_Result = tmp_ann_custom_calculator_example_OverflowException_ex;
            }
            CompleteMemberDetail detail_calculator_example_OverflowException_ex = TypeObjectUtils::build_complete_member_detail(name_calculator_example_OverflowException_ex, member_ann_builtin_calculator_example_OverflowException_ex, ann_custom_Calculator_subtraction_Result);
            CompleteStructMember member_calculator_example_OverflowException_ex = TypeObjectUtils::build_complete_struct_member(common_calculator_example_OverflowException_ex, detail_calculator_example_OverflowException_ex);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_subtraction_Result, member_calculator_example_OverflowException_ex);
        }
        CompleteStructType struct_type_Calculator_subtraction_Result = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_subtraction_Result, header_Calculator_subtraction_Result, member_seq_Calculator_subtraction_Result);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_subtraction_Result, type_name_Calculator_subtraction_Result.to_string(), type_ids_Calculator_subtraction_Result))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_subtraction_Result already registered in TypeObjectRegistry for a different type.");
        }
    }
}

//}  // subtraction
 

}  // namespace detail

// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_Request_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_Request)
{

    ReturnCode_t return_code_Calculator_Request {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_Request =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_Request", type_ids_Calculator_Request);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_Request)
    {
        StructTypeFlag struct_flags_Calculator_Request = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::MUTABLE,
                false, false);
        QualifiedTypeName type_name_Calculator_Request = "calculator_example::detail::Calculator_Request";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_Request;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_Request;
        CompleteTypeDetail detail_Calculator_Request = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_Request, ann_custom_Calculator_Request, type_name_Calculator_Request.to_string());
        CompleteStructHeader header_Calculator_Request;
        header_Calculator_Request = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_Request);
        CompleteStructMemberSeq member_seq_Calculator_Request;
        {
            TypeIdentifierPair type_ids_representation_limits;
            ReturnCode_t return_code_representation_limits {eprosima::fastdds::dds::RETCODE_OK};
            return_code_representation_limits =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_representation_limits_In", type_ids_representation_limits);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_representation_limits)
            {
                ::calculator_example::detail::register_Calculator_representation_limits_In_type_identifier(type_ids_representation_limits);
            }
            StructMemberFlag member_flags_representation_limits = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_representation_limits = 0x0e205a8d;
            bool common_representation_limits_ec {false};
            CommonStructMember common_representation_limits {TypeObjectUtils::build_common_struct_member(member_id_representation_limits, member_flags_representation_limits, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_representation_limits, common_representation_limits_ec))};
            if (!common_representation_limits_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure representation_limits member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_representation_limits = "representation_limits";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_representation_limits;
            ann_custom_Calculator_Request.reset();
            AppliedAnnotationSeq tmp_ann_custom_representation_limits;
            eprosima::fastcdr::optional<std::string> unit_representation_limits;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_representation_limits;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_representation_limits;
            eprosima::fastcdr::optional<std::string> hash_id_representation_limits;
            hash_id_representation_limits = "";

            if (unit_representation_limits.has_value() || min_representation_limits.has_value() || max_representation_limits.has_value() || hash_id_representation_limits.has_value())
            {
                member_ann_builtin_representation_limits = TypeObjectUtils::build_applied_builtin_member_annotations(unit_representation_limits, min_representation_limits, max_representation_limits, hash_id_representation_limits);
            }
            if (!tmp_ann_custom_representation_limits.empty())
            {
                ann_custom_Calculator_Request = tmp_ann_custom_representation_limits;
            }
            CompleteMemberDetail detail_representation_limits = TypeObjectUtils::build_complete_member_detail(name_representation_limits, member_ann_builtin_representation_limits, ann_custom_Calculator_Request);
            CompleteStructMember member_representation_limits = TypeObjectUtils::build_complete_struct_member(common_representation_limits, detail_representation_limits);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_Request, member_representation_limits);
        }
        {
            TypeIdentifierPair type_ids_addition;
            ReturnCode_t return_code_addition {eprosima::fastdds::dds::RETCODE_OK};
            return_code_addition =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_addition_In", type_ids_addition);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_addition)
            {
                ::calculator_example::detail::register_Calculator_addition_In_type_identifier(type_ids_addition);
            }
            StructMemberFlag member_flags_addition = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_addition = 0x04e82a2b;
            bool common_addition_ec {false};
            CommonStructMember common_addition {TypeObjectUtils::build_common_struct_member(member_id_addition, member_flags_addition, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_addition, common_addition_ec))};
            if (!common_addition_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure addition member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_addition = "addition";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_addition;
            ann_custom_Calculator_Request.reset();
            AppliedAnnotationSeq tmp_ann_custom_addition;
            eprosima::fastcdr::optional<std::string> unit_addition;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_addition;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_addition;
            eprosima::fastcdr::optional<std::string> hash_id_addition;
            hash_id_addition = "";

            if (unit_addition.has_value() || min_addition.has_value() || max_addition.has_value() || hash_id_addition.has_value())
            {
                member_ann_builtin_addition = TypeObjectUtils::build_applied_builtin_member_annotations(unit_addition, min_addition, max_addition, hash_id_addition);
            }
            if (!tmp_ann_custom_addition.empty())
            {
                ann_custom_Calculator_Request = tmp_ann_custom_addition;
            }
            CompleteMemberDetail detail_addition = TypeObjectUtils::build_complete_member_detail(name_addition, member_ann_builtin_addition, ann_custom_Calculator_Request);
            CompleteStructMember member_addition = TypeObjectUtils::build_complete_struct_member(common_addition, detail_addition);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_Request, member_addition);
        }
        {
            TypeIdentifierPair type_ids_subtraction;
            ReturnCode_t return_code_subtraction {eprosima::fastdds::dds::RETCODE_OK};
            return_code_subtraction =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_subtraction_In", type_ids_subtraction);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_subtraction)
            {
                ::calculator_example::detail::register_Calculator_subtraction_In_type_identifier(type_ids_subtraction);
            }
            StructMemberFlag member_flags_subtraction = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_subtraction = 0x096bbc8d;
            bool common_subtraction_ec {false};
            CommonStructMember common_subtraction {TypeObjectUtils::build_common_struct_member(member_id_subtraction, member_flags_subtraction, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_subtraction, common_subtraction_ec))};
            if (!common_subtraction_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure subtraction member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_subtraction = "subtraction";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_subtraction;
            ann_custom_Calculator_Request.reset();
            AppliedAnnotationSeq tmp_ann_custom_subtraction;
            eprosima::fastcdr::optional<std::string> unit_subtraction;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_subtraction;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_subtraction;
            eprosima::fastcdr::optional<std::string> hash_id_subtraction;
            hash_id_subtraction = "";

            if (unit_subtraction.has_value() || min_subtraction.has_value() || max_subtraction.has_value() || hash_id_subtraction.has_value())
            {
                member_ann_builtin_subtraction = TypeObjectUtils::build_applied_builtin_member_annotations(unit_subtraction, min_subtraction, max_subtraction, hash_id_subtraction);
            }
            if (!tmp_ann_custom_subtraction.empty())
            {
                ann_custom_Calculator_Request = tmp_ann_custom_subtraction;
            }
            CompleteMemberDetail detail_subtraction = TypeObjectUtils::build_complete_member_detail(name_subtraction, member_ann_builtin_subtraction, ann_custom_Calculator_Request);
            CompleteStructMember member_subtraction = TypeObjectUtils::build_complete_struct_member(common_subtraction, detail_subtraction);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_Request, member_subtraction);
        }
        CompleteStructType struct_type_Calculator_Request = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_Request, header_Calculator_Request, member_seq_Calculator_Request);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_Request, type_name_Calculator_Request.to_string(), type_ids_Calculator_Request))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_Request already registered in TypeObjectRegistry for a different type.");
        }
    }
}
// TypeIdentifier is returned by reference: dependent structures/unions are registered in this same method
void register_Calculator_Reply_type_identifier(
        TypeIdentifierPair& type_ids_Calculator_Reply)
{

    ReturnCode_t return_code_Calculator_Reply {eprosima::fastdds::dds::RETCODE_OK};
    return_code_Calculator_Reply =
        eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
        "calculator_example::detail::Calculator_Reply", type_ids_Calculator_Reply);
    if (eprosima::fastdds::dds::RETCODE_OK != return_code_Calculator_Reply)
    {
        StructTypeFlag struct_flags_Calculator_Reply = TypeObjectUtils::build_struct_type_flag(eprosima::fastdds::dds::xtypes::ExtensibilityKind::MUTABLE,
                false, false);
        QualifiedTypeName type_name_Calculator_Reply = "calculator_example::detail::Calculator_Reply";
        eprosima::fastcdr::optional<AppliedBuiltinTypeAnnotations> type_ann_builtin_Calculator_Reply;
        eprosima::fastcdr::optional<AppliedAnnotationSeq> ann_custom_Calculator_Reply;
        CompleteTypeDetail detail_Calculator_Reply = TypeObjectUtils::build_complete_type_detail(type_ann_builtin_Calculator_Reply, ann_custom_Calculator_Reply, type_name_Calculator_Reply.to_string());
        CompleteStructHeader header_Calculator_Reply;
        header_Calculator_Reply = TypeObjectUtils::build_complete_struct_header(TypeIdentifier(), detail_Calculator_Reply);
        CompleteStructMemberSeq member_seq_Calculator_Reply;
        {
            TypeIdentifierPair type_ids_representation_limits;
            ReturnCode_t return_code_representation_limits {eprosima::fastdds::dds::RETCODE_OK};
            return_code_representation_limits =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_representation_limits_Result", type_ids_representation_limits);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_representation_limits)
            {
                ::calculator_example::detail::register_Calculator_representation_limits_Result_type_identifier(type_ids_representation_limits);
            }
            StructMemberFlag member_flags_representation_limits = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_representation_limits = 0x0e205a8d;
            bool common_representation_limits_ec {false};
            CommonStructMember common_representation_limits {TypeObjectUtils::build_common_struct_member(member_id_representation_limits, member_flags_representation_limits, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_representation_limits, common_representation_limits_ec))};
            if (!common_representation_limits_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure representation_limits member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_representation_limits = "representation_limits";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_representation_limits;
            ann_custom_Calculator_Reply.reset();
            AppliedAnnotationSeq tmp_ann_custom_representation_limits;
            eprosima::fastcdr::optional<std::string> unit_representation_limits;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_representation_limits;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_representation_limits;
            eprosima::fastcdr::optional<std::string> hash_id_representation_limits;
            hash_id_representation_limits = "";

            if (unit_representation_limits.has_value() || min_representation_limits.has_value() || max_representation_limits.has_value() || hash_id_representation_limits.has_value())
            {
                member_ann_builtin_representation_limits = TypeObjectUtils::build_applied_builtin_member_annotations(unit_representation_limits, min_representation_limits, max_representation_limits, hash_id_representation_limits);
            }
            if (!tmp_ann_custom_representation_limits.empty())
            {
                ann_custom_Calculator_Reply = tmp_ann_custom_representation_limits;
            }
            CompleteMemberDetail detail_representation_limits = TypeObjectUtils::build_complete_member_detail(name_representation_limits, member_ann_builtin_representation_limits, ann_custom_Calculator_Reply);
            CompleteStructMember member_representation_limits = TypeObjectUtils::build_complete_struct_member(common_representation_limits, detail_representation_limits);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_Reply, member_representation_limits);
        }
        {
            TypeIdentifierPair type_ids_addition;
            ReturnCode_t return_code_addition {eprosima::fastdds::dds::RETCODE_OK};
            return_code_addition =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_addition_Result", type_ids_addition);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_addition)
            {
                ::calculator_example::detail::register_Calculator_addition_Result_type_identifier(type_ids_addition);
            }
            StructMemberFlag member_flags_addition = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_addition = 0x04e82a2b;
            bool common_addition_ec {false};
            CommonStructMember common_addition {TypeObjectUtils::build_common_struct_member(member_id_addition, member_flags_addition, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_addition, common_addition_ec))};
            if (!common_addition_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure addition member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_addition = "addition";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_addition;
            ann_custom_Calculator_Reply.reset();
            AppliedAnnotationSeq tmp_ann_custom_addition;
            eprosima::fastcdr::optional<std::string> unit_addition;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_addition;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_addition;
            eprosima::fastcdr::optional<std::string> hash_id_addition;
            hash_id_addition = "";

            if (unit_addition.has_value() || min_addition.has_value() || max_addition.has_value() || hash_id_addition.has_value())
            {
                member_ann_builtin_addition = TypeObjectUtils::build_applied_builtin_member_annotations(unit_addition, min_addition, max_addition, hash_id_addition);
            }
            if (!tmp_ann_custom_addition.empty())
            {
                ann_custom_Calculator_Reply = tmp_ann_custom_addition;
            }
            CompleteMemberDetail detail_addition = TypeObjectUtils::build_complete_member_detail(name_addition, member_ann_builtin_addition, ann_custom_Calculator_Reply);
            CompleteStructMember member_addition = TypeObjectUtils::build_complete_struct_member(common_addition, detail_addition);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_Reply, member_addition);
        }
        {
            TypeIdentifierPair type_ids_subtraction;
            ReturnCode_t return_code_subtraction {eprosima::fastdds::dds::RETCODE_OK};
            return_code_subtraction =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "calculator_example::detail::Calculator_subtraction_Result", type_ids_subtraction);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_subtraction)
            {
                ::calculator_example::detail::register_Calculator_subtraction_Result_type_identifier(type_ids_subtraction);
            }
            StructMemberFlag member_flags_subtraction = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_subtraction = 0x096bbc8d;
            bool common_subtraction_ec {false};
            CommonStructMember common_subtraction {TypeObjectUtils::build_common_struct_member(member_id_subtraction, member_flags_subtraction, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_subtraction, common_subtraction_ec))};
            if (!common_subtraction_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure subtraction member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_subtraction = "subtraction";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_subtraction;
            ann_custom_Calculator_Reply.reset();
            AppliedAnnotationSeq tmp_ann_custom_subtraction;
            eprosima::fastcdr::optional<std::string> unit_subtraction;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_subtraction;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_subtraction;
            eprosima::fastcdr::optional<std::string> hash_id_subtraction;
            hash_id_subtraction = "";

            if (unit_subtraction.has_value() || min_subtraction.has_value() || max_subtraction.has_value() || hash_id_subtraction.has_value())
            {
                member_ann_builtin_subtraction = TypeObjectUtils::build_applied_builtin_member_annotations(unit_subtraction, min_subtraction, max_subtraction, hash_id_subtraction);
            }
            if (!tmp_ann_custom_subtraction.empty())
            {
                ann_custom_Calculator_Reply = tmp_ann_custom_subtraction;
            }
            CompleteMemberDetail detail_subtraction = TypeObjectUtils::build_complete_member_detail(name_subtraction, member_ann_builtin_subtraction, ann_custom_Calculator_Reply);
            CompleteStructMember member_subtraction = TypeObjectUtils::build_complete_struct_member(common_subtraction, detail_subtraction);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_Reply, member_subtraction);
        }
        {
            TypeIdentifierPair type_ids_remoteEx;
            ReturnCode_t return_code_remoteEx {eprosima::fastdds::dds::RETCODE_OK};
            return_code_remoteEx =
                eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->type_object_registry().get_type_identifiers(
                "eprosima::fastdds::dds::rpc::RemoteExceptionCode_t", type_ids_remoteEx);

            if (eprosima::fastdds::dds::RETCODE_OK != return_code_remoteEx)
            {
                ::eprosima::fastdds::dds::rpc::register_RemoteExceptionCode_t_type_identifier(type_ids_remoteEx);
            }
            StructMemberFlag member_flags_remoteEx = TypeObjectUtils::build_struct_member_flag(eprosima::fastdds::dds::xtypes::TryConstructFailAction::DISCARD,
                    true, false, false, false);
            MemberId member_id_remoteEx = 0x0f8e48f0;
            bool common_remoteEx_ec {false};
            CommonStructMember common_remoteEx {TypeObjectUtils::build_common_struct_member(member_id_remoteEx, member_flags_remoteEx, TypeObjectUtils::retrieve_complete_type_identifier(type_ids_remoteEx, common_remoteEx_ec))};
            if (!common_remoteEx_ec)
            {
                EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION, "Structure remoteEx member TypeIdentifier inconsistent.");
                return;
            }
            MemberName name_remoteEx = "remoteEx";
            eprosima::fastcdr::optional<AppliedBuiltinMemberAnnotations> member_ann_builtin_remoteEx;
            ann_custom_Calculator_Reply.reset();
            AppliedAnnotationSeq tmp_ann_custom_remoteEx;
            eprosima::fastcdr::optional<std::string> unit_remoteEx;
            eprosima::fastcdr::optional<AnnotationParameterValue> min_remoteEx;
            eprosima::fastcdr::optional<AnnotationParameterValue> max_remoteEx;
            eprosima::fastcdr::optional<std::string> hash_id_remoteEx;
            hash_id_remoteEx = "";

            if (unit_remoteEx.has_value() || min_remoteEx.has_value() || max_remoteEx.has_value() || hash_id_remoteEx.has_value())
            {
                member_ann_builtin_remoteEx = TypeObjectUtils::build_applied_builtin_member_annotations(unit_remoteEx, min_remoteEx, max_remoteEx, hash_id_remoteEx);
            }
            if (!tmp_ann_custom_remoteEx.empty())
            {
                ann_custom_Calculator_Reply = tmp_ann_custom_remoteEx;
            }
            CompleteMemberDetail detail_remoteEx = TypeObjectUtils::build_complete_member_detail(name_remoteEx, member_ann_builtin_remoteEx, ann_custom_Calculator_Reply);
            CompleteStructMember member_remoteEx = TypeObjectUtils::build_complete_struct_member(common_remoteEx, detail_remoteEx);
            TypeObjectUtils::add_complete_struct_member(member_seq_Calculator_Reply, member_remoteEx);
        }
        CompleteStructType struct_type_Calculator_Reply = TypeObjectUtils::build_complete_struct_type(struct_flags_Calculator_Reply, header_Calculator_Reply, member_seq_Calculator_Reply);
        if (eprosima::fastdds::dds::RETCODE_BAD_PARAMETER ==
                TypeObjectUtils::build_and_register_struct_type_object(struct_type_Calculator_Reply, type_name_Calculator_Reply.to_string(), type_ids_Calculator_Reply))
        {
            EPROSIMA_LOG_ERROR(XTYPES_TYPE_REPRESENTATION,
                    "calculator_example::detail::Calculator_Reply already registered in TypeObjectRegistry for a different type.");
        }
    }
}

} // namespace calculator_example

